<%-- 
    Document   : top
    Created on : 2013-4-26, 10:48:38
    Author     : Administrator
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE html>
<html>
    <head>
        <base href="<%= basePath%>"/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type="text/javascript" src="resource/js/jquery-1.9.1.min.js"></script>
        <style>
            *{padding:0;margin:0;font-family: 微软雅黑,Verdana,sans-serif,宋体;font-size: 14px;border-width: 1px;}
            .btn{position:relative;background: transparent;width:50px;height:23px;}
            .btn-icon{
                background: url(resource/images/ico/home.png) no-repeat;
                width: 16px;
                height: auto;
                top: 0;
                left: 0;
                bottom: 0;
                right: auto;
                position: absolute;
                background-position: left center;
            }
            .btn-text{
                height:16px;line-height: 16px;margin-left: 16px;
            }
        </style>
        <script>
            $(document).ready(function() {

                var timer = window.setInterval(showTime, 1000);
                function showTime() {
                    var date = new Date();
                    var str = "";
                    var year = date.getFullYear();
                    var month = date.getMonth() + 1;
                    var dates = date.getDate();
                    var hour = date.getHours();
                    var minute = date.getMinutes();
                    var second = date.getSeconds();
                    str = year + "-" + month + "-" + dates + " " + hour + ":" + minute + ":" + second;
                    $("#time").html(str);
                }

                $("#logout").click(function() {
                    if (confirm("你确定退出系统吗？")) {
                        window.parent.document.location.href = "main/loginout";
                    }
                });

                $("#desktop").click(function() {
                    $(window.parent.document).find("#centerFrm").attr("src", "/pages/main/desktop.jsp");
                });
            });
        </script>
    </head>
    <body>
        <div style="height:80px;background: url(resource/images/top_bg.png) repeat-x;">
            <div style="width:300px;height:60px;float:left;font-size: 1.5em;font-weight: bold;line-height: 60px;margin-left: 10px;color:white;">
                道路客运安全管理系统
            </div>
            <div style="width:400px;height:80px;float:right;">
                <div style="height:30px;margin-top: 30px;">
                    <button id="desktop" class="btn">
                        <span class="btn-text">桌面</span>
                        <span class="btn-icon"></span>
                    </button>
                    <button id="logout" class="btn" style="margin-left: 10px;">
                        <span class="btn-text" >退出</span>
                        <span class="btn-icon" style="background: url(resource/images/ico/exit.png) no-repeat;margin-top: 3px;"></span>
                    </button>
                    <span style="margin-left: 10px;font-size: 14px;color:black;">当前时间：</span>
                    <span id="time" style="font-size: 14px;color:white;">yy-mm-dd hh:mm:ss</span>
                </div>
            </div>
        </div>
    </body>
</html>
